#!/bin/sh
[ "$(stat -c %y ~/.cache/corona 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] &&
	curl -s https://corona-stats.online > ~/.cache/corona

case $BLOCK_BUTTON in
        1) xdg-open "https://covid.hespress.com/" ;;
	6) "$TERMINAL" -e "$EDITOR" "$0" ;;
esac

		grep -i "morocco" ~/.cache/corona |
			sed "s/\s*//g ; s/│/;/g ; s/║//g ; s/\x1b\[[0-9;]*m//g" |
			awk -F ';' '{print "😷" $8"(" $4")" "💀"$5"(" $6")"}'
